﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Util
{
    public static class SpreadsheetExt
    {
        public static ICollection<DataRow> ToRows(this Spreadsheet spreadsheet)
        {
            if (spreadsheet == null) return null;
            return spreadsheet.Rows;
        }

        public static ICollection<DataColumn> ToColumns(this Spreadsheet spreadsheet)
        {
            if (spreadsheet == null) return null;
            return spreadsheet.Columns;
        }

        public static object[,] ToData(this Spreadsheet spreadsheet)
        {
            if (spreadsheet == null) return null;
            return spreadsheet.Data;
        }
    }
}
